﻿<script src="~/js/bootstrap.js"></script>
<script src="~/blog/js/bootstrap-hover-dropdown.js"></script>
<script>
function search(e) {
	var keywords = $("#searchInput").val();
	if(!keywords) {
        location.href = "@ViewBag.searchUrl";
	} else {
        var tpl = '<form style="display: none" action="@ViewBag.searchUrl" method="get">';
        tpl += '<input name="keywords" value="' + keywords + '" />';
        tpl += "</form";
        var $tpl = $(tpl);
        $('body').append($tpl)
        $tpl.submit();
        $tpl.remove();
	}
}
</script>